using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebControls;
using InfraStructureLayer;

public partial class UserControls_uctAdminMenu : SFUserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected bool rptMenu_NeedsDataSource()
    {
        
            DataTable dt = CurrentContext.Menu.Clone();

            foreach (DataRow dr in CurrentContext.Menu.Select("LanguageId=" + CurrentContext.LanguageId.ToString() + " AND ParentMenuId IS NOT NULL"))
            {
                if (Convert.ToBoolean(dr["IsAdminMenu"]))
                {
                    dt.ImportRow(dr);
                }
            }

            rptMenu.DataSource = dt;
            rptMenu.DataBind();

            return false;
    }

}
